/*
* Copyright (c) 2010-2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Camerality UI container.
*
*/
#ifndef CAMERALITYCONTAINER_H_
#define CAMERALITYCONTAINER_H_

// INCLUDES
#include "cameralitybasecontainer.h"

// FORWARD DECLARATIONS
class CAknAppUi;
class CCameralityGLContainer;
class CCameralityViewfinderContainer;
class CCameralityInfoContainer;

// CLASS DECLARATION
/**
 * Container control class that handles the rendering engine initialization and deinitializations.
 * Also uses the CCameralityGLRenderer class to do the actual rendering.
 */
class CCameralityContainer : public CCameralityBaseContainer, MCoeControlObserver
    {
public: // Constructors and destructor
    static CCameralityContainer* NewL();
    virtual ~CCameralityContainer();

public: // Functions from base classes
    void Show(const TRect& extent);
    void Hide();

public: // New methods
    void StartAllActivityL();
    void StopAllActivity();
    
private: 
    void SizeChanged();
    void HandleResourceChange(TInt aType);
    TInt CountComponentControls() const;
    CCoeControl* ComponentControl(TInt aIndex) const;
    void Draw(const TRect& aRect) const;
    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);

private: // New methods
    void StartViewfinderL();
    void StopViewfinder();
    void StartAnimationL();
    void StopAnimation();
    void StartProfilingL();
    void StopProfiling();
    TRect CalculateRect();
    void AdjustOrdinals();
    
private: // Private constructors
    CCameralityContainer();
    void ConstructL();

private: // Data
    CCameralityGLContainer *iGlContainer;
    CCameralityViewfinderContainer *iVfContainer;
    CCameralityInfoContainer* iInfoContainer;
    };

#endif /* CAMERALITYCONTAINER_H_ */

// End of file
